package com.slg.android.manyanime.bean;

import org.json.JSONException;
import org.json.JSONObject;

/**
 * Created by Darker on 2015/3/12.
 */
public class NoticeList {
    /**
     * 我的通知的id
     */
    private String id;
    /**
     * 我的通知内容
     */
    private String cont;
    /**
     * 我的通知时间
     */
    private String update_time;

    /**
     * 图片的url
     */
    private String icon;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getCont() {
        return cont;
    }

    public void setCont(String cont) {
        this.cont = cont;
    }

    public String getUpdate_time() {
        return update_time;
    }

    public void setUpdate_time(String update_time) {
        this.update_time = update_time;
    }

    public String getIcon() {
        return icon;
    }

    public void setIcon(String icon) {
        this.icon = icon;
    }

    //todo 解析
    public void parseJSON(JSONObject json) {
        if (json != null) {
            try {
                id = json.getString("id");
                cont = json.getString("cont");
                update_time = json.getString("update_time");
                icon = json.getString("icon");

            } catch (JSONException e) {
                e.printStackTrace();
            }
        }
    }
}
